package com.rattsoftware.server.dao;

import java.util.List;

import com.rattsoftware.server.admin.model.Staff;
import com.rattsoftware.server.admin.model.paging.PagingLoadConfig;
import com.rattsoftware.server.admin.model.paging.PagingLoadResult;

/**
 * Provides data access 
 * services to the <code>Staff service</code>.
 * 
 *
 */
public interface StaffDAO extends BaseDAO<Staff> {
	
	/**
	 * Gets a list of staff in the database.
	 * 
	 * @return the staff list.
	 */
	List<Staff> getStaff();
	
	/**
	 * Retrieves a Staff by identifier
	 * 
	 * @param id Integer 
	 * @return Staff, or null if no match found
	 */
	Staff getStaff(Integer id);
	
	/**
	 * Retrieves a Staff by identifier
	 * 
	 * @param firstName String 
	 * @param lastName String 
	 * @return Staff, or null if no match found
	 */	
	Staff getStaff(String firstName, String lastName);
	
	/**
	 * Saves a staff to the database.
	 * 
	 * @param staff the staff to save.
	 */
	void saveStaff(Staff staff);
	
	/**
	 * Removes a Staff from the database.
	 * 
	 * @param staff the staff to remove.
	 * 
	 */
	void deleteStaff(Staff staff);
	
	/**
	 * Retrieves a page of the staff data.
	 * 
	 * @param pagingLoadConfig
	 *            config to specify paging related config
	 * @return PagingLoadResult containing a page of staff data
	 */
	PagingLoadResult<Staff> getStaffList(PagingLoadConfig pagingLoadConfig);
	
	/**
	 * Retrieves a page of the staff data that belongs to a given department.
	 * 
	 * @param deptId
	 *            Integer
	 * @param pagingLoadConfig
	 *            config to specify paging related config
	 * @return PagingLoadResult containing a page of staff data
	 */
	PagingLoadResult<Staff> getStaffList(Integer deptId, PagingLoadConfig pagingLoadConfig);
}
